<template>
  <a-config-provider :locale="locale">
    <!-- 加载 -->
    <c-loading v-if="isLoading" />
      <router-view />
  </a-config-provider>
</template>

<script setup>
import { provide, reactive, ref } from "@vue/runtime-core";
import { UserInfo } from "@/configs/store";
import CLoading from "@/components/my-loading/index.vue";
// import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN";
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';

import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';

dayjs.locale('zh-cn');

// def
const userInfo = new UserInfo();
const isLoading = ref(false);

// provide
provide("userInfo", reactive(userInfo));
provide("isLoading", isLoading);
</script>
